Add customary args to gtk_style_paint_spinner()
authorMatthias Clasen <mclasen@redhat.com>
Fri, 27 Nov 2009 06:23:55 +0000 (01:23 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 27 Nov 2009 06:23:55 +0000 (01:23 -0500)
...and adjust all callers.

gtk/gtkcellrendererspinner.c
gtk/gtkspinner.c
gtk/gtkstyle.c
gtk/gtkstyle.h

index 70614d35f340493681c67e643b42cbfd5bb38edb..2524aca2d7e007ee02a43151e4cfb0cb11053100 100644 (file)
@@ -380,6 +380,9 @@ gtk_cell_renderer_spinner_render (GtkCellRenderer *cellr,
   gtk_paint_spinner (widget->style,
                      window,
                      state,
+                     expose_area,
+                     widget,
+                     "cell",
                      priv->pulse,
                      draw_rect.x, draw_rect.y,
                      draw_rect.width, draw_rect.height);
index 0c341b86d9743d6a867141301acaa377eac35782..59b25ea27e1c4d4eefc6af2cef6379c4c2a28bf6 100644 (file)
@@ -215,7 +215,8 @@ gtk_spinner_init (GtkSpinner *spinner)
 }
 
 static gboolean
-gtk_spinner_expose (GtkWidget *widget, GdkEventExpose *event)
+gtk_spinner_expose (GtkWidget      *widget,
+                    GdkEventExpose *event)
 {
   GtkStateType state_type;
   GtkSpinnerPrivate *priv;
@@ -236,6 +237,9 @@ gtk_spinner_expose (GtkWidget *widget, GdkEventExpose *event)
   gtk_paint_spinner (widget->style,
                      widget->window,
                      state_type,
+                     &event->area,
+                     widget,
+                     "spinner",
                      priv->current,
                      event->area.x, event->area.y,
                      event->area.width, event->area.height);
index 01f8ff02a62d45d5012e7098ec1980de49403dbe..20e14a6331079305827dc82f6bf34646f4aa9642 100644 (file)
@@ -313,14 +313,17 @@ static void gtk_default_draw_resize_grip (GtkStyle       *style,
                                           gint            y,
                                           gint            width,
                                           gint            height);
-static void gtk_default_draw_spinner     (GtkStyle     *style,
-                                         GdkWindow    *window,
-                                         GtkStateType  state_type,
-                                         guint         step,
-                                         gint           x,
-                                         gint           y,
-                                         gint           width,
-                                         gint           height);
+static void gtk_default_draw_spinner     (GtkStyle       *style,
+                                         GdkWindow      *window,
+                                         GtkStateType    state_type,
+                                          GdkRectangle   *area,
+                                          GtkWidget      *widget,
+                                          const gchar    *detail,
+                                         guint           step,
+                                         gint            x,
+                                         gint            y,
+                                         gint            width,
+                                         gint            height);
 
 static void rgb_to_hls                 (gdouble         *r,
                                         gdouble         *g,
@@ -5612,6 +5615,9 @@ static void
 gtk_default_draw_spinner (GtkStyle     *style,
                           GdkWindow    *window,
                           GtkStateType  state_type,
+                          GdkRectangle *area,
+                          GtkWidget    *widget,
+                          const gchar  *detail,
                           guint         step,
                           gint          x,
                           gint          y,
@@ -6720,30 +6726,37 @@ gtk_paint_resize_grip (GtkStyle           *style,
  * @style: a #GtkStyle
  * @window: a #GdkWindow
  * @state_type: a state
- * @widget: the widget
- * @step: the nth step, a value between 0 and GtkSpinner::num-steps
- * @x: the x origin of the rectangle in which to draw the resize grip
- * @y: the y origin of the rectangle in which to draw the resize grip
- * @width: the width of the rectangle in which to draw the resize grip
- * @height: the height of the rectangle in which to draw the resize grip
+ * @area: clip rectangle, or %NULL if the
+ *        output should not be clipped
+ * @widget: the widget (may be %NULL)
+ * @detail: a style detail (may be %NULL)
+ * @step: the nth step, a value between 0 and #GtkSpinner:num-steps
+ * @x: the x origin of the rectangle in which to draw the spinner
+ * @y: the y origin of the rectangle in which to draw the spinner
+ * @width: the width of the rectangle in which to draw the spinner
+ * @height: the height of the rectangle in which to draw the spinner
  *
  * Draws a spinner on @window using the given parameters.
  */
 void
-gtk_paint_spinner (GtkStyle     *style,
-                  GdkWindow    *window,
-                  GtkStateType  state_type,
-                  guint         step,
-                  gint          x,
-                  gint          y,
-                  gint          width,
-                  gint          height)
+gtk_paint_spinner (GtkStyle           *style,
+                  GdkWindow          *window,
+                  GtkStateType        state_type,
+                   const GdkRectangle *area,
+                   GtkWidget          *widget,
+                   const gchar        *detail,
+                  guint               step,
+                  gint                x,
+                  gint                y,
+                  gint                width,
+                  gint                height)
 {
   g_return_if_fail (GTK_IS_STYLE (style));
   g_return_if_fail (GTK_STYLE_GET_CLASS (style)->draw_spinner != NULL);
   g_return_if_fail (style->depth == gdk_drawable_get_depth (window));
 
   GTK_STYLE_GET_CLASS (style)->draw_spinner (style, window, state_type,
+                                             (GdkRectangle *)area, widget, detail,
                                             step, x, y, width, height);
 }
 
index 3e1401bcf461a86a0b9813f9b961a62ab93a83fa..75dc109ec9742ec0bc8e92a7821e96098382c4a0 100644 (file)
@@ -406,6 +406,9 @@ struct _GtkStyleClass
   void (*draw_spinner)          (GtkStyle              *style,
                                 GdkWindow              *window,
                                 GtkStateType            state_type,
+                                GdkRectangle           *area,
+                                GtkWidget              *widget,
+                                const gchar            *detail,
                                 guint                   step,
                                 gint                    x,
                                 gint                    y,
@@ -863,14 +866,17 @@ void gtk_paint_resize_grip (GtkStyle           *style,
                             gint                y,
                             gint                width,
                             gint                height);
-void gtk_paint_spinner     (GtkStyle     *style,
-                           GdkWindow    *window,
-                           GtkStateType  state_type,
-                           guint         step,
-                           gint          x,
-                           gint          y,
-                           gint          width,
-                           gint          height);
+void gtk_paint_spinner     (GtkStyle           *style,
+                           GdkWindow          *window,
+                           GtkStateType        state_type,
+                            const GdkRectangle *area,
+                            GtkWidget          *widget,
+                            const gchar        *detail,
+                           guint               step,
+                           gint                x,
+                           gint                y,
+                           gint                width,
+                           gint                height);
 
 GType      gtk_border_get_type (void) G_GNUC_CONST;
 GtkBorder *gtk_border_new      (void) G_GNUC_MALLOC;